/**
  ******************************************************************************
  * @file    usart.h
  * @author  chengbb
  * @version V1.0
  * @date    2017-07-23
  * @brief   串口驱动头文件
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2016 MindX</center></h2>
  ******************************************************************************
  */
/** @addtogroup BSP
* @{
*/
#ifndef __BSP_USART_H
#define __BSP_USART_H

#ifdef __cplusplus
extern "C" {
#endif

#include "bsp.h"
#include <stdio.h>

/** 串口接收回调*/
typedef void (* usart_recv_callback)(uint8_t ch);

void Usart_Config(USART_TypeDef* USARTx, uint32_t baudRate, usart_recv_callback cb);
void Usart_SendChar(USART_TypeDef* USARTx, char *ch, uint16_t len);
void UsartPrintf(USART_TypeDef* USARTx, char* fmt,...);

#ifdef __cplusplus
}
#endif

#endif

/**
  * @}
  */
/******************* (C) COPYRIGHT 2017 MINDX ******END OF FILE******************/
